package com.tvunetworks.center.device.model.result;

import com.tvunetworks.center.common.util.Result;
import com.tvunetworks.center.common.util.ResultUtil;

/**
 * @program: tvucc-aggregator
 * @description: ResultConstant
 * @author lebronchen
 * @create: 2020-03-13 08:25
 **/
public interface ResultConstant {
    /**
     * User
     */
    interface User {
        Result GET_ADMIN_SESSION_FAILED = ResultUtil.error("81101901", "Get super admin session failed");
        Result NOT_PERMISSION = ResultUtil.error("81101902", "Only the support account has the permission");
    }

    /**
     * Slug
     */
    interface Slug {
        Result CREATE_SLUG_FAILED = ResultUtil.error("80600112", "Create Or Update slug failed");
        Result SLUG_FAILED = ResultUtil.error("80600113", " User does not have the device");
        Result DELETE_SLUG_FAILED = ResultUtil.error("80600114", "Delete slug failed");
        Result SELECT_SLUG_FAILED = ResultUtil.error("80600115", "Select slug failed");
    }
    /**
     * Group
     */
    interface Group {
        Result NOT_EXIST = ResultUtil.error("81101201", "Group not exist");

    }
    /**
     * Device
     */
    interface Device {
        Result DEVICE_NOT_EXIST = ResultUtil.error("81101301", "Device not exist");
        Result R_NOT_EXIST = ResultUtil.error("81101302", "R not exist");
        Result SOURCE_NOT_EXIST = ResultUtil.error("81101303", "Source not exist");
        Result DEVICE_NOT_T = ResultUtil.error("81101304", "Device not T");
        Result R_NOT_LIVING = ResultUtil.error("81101305", "R not living");

        Result REGIST_DEVICE_FAILED = ResultUtil.error("81101309", "Regist device failed");


        Result PEER_ID_EXIST = ResultUtil.error("81101310", "PeerId exist");
        Result NAME_EXIST = ResultUtil.error("81101310", "Name exist");
        Result PACK_ID_LENGTH_MUST_16 = ResultUtil.error("81101311", "Pack Id length must 16");
        Result RECEIVER_VERSION_MUST_BE_MORE_THAN_7_7 = ResultUtil.error("81101312", "Receiver version must be more than 7.7");
        Result DEVICE_IS_NOT_R = ResultUtil.error("81101313", "Device not R");
        Result DEVICE_IP_IS_EMPTY = ResultUtil.error("81101314", "Device ip is empty");
        Result R_NOT_LIVING_AND_NOT_ONLINE = ResultUtil.error("81101315", "R not living And not Online");
        Result PLATFORM_NOT_MODIFIED = ResultUtil.error("81101316", "Platform cannot be modified");


    }
    /**
     * TimeLock
     */
    interface TimeLock {
        Result SEND_MESSAGE_MSGPIPE_FAILED = ResultUtil.error("81101801", "Send message to msgpipe failed");
        Result RECEIVER_QUERY_INFO_DATA_ERROR = ResultUtil.error("81100501", "Receiver QueryInfo data error");
        Result RECEIVER_CONFIG_NOT_EXIST_LOCAL_IP_ADDRESSES = ResultUtil.error("81100502", "Receiver config not exist LocalIPAddresses");
        Result GET_IP_PORT_ERROR = ResultUtil.error("81100503", "Get ip port error");
        Result SYNCHRONIZING = ResultUtil.error("81100504", "Synchronizing");
        Result EXIST_DEVICE_SYNCHRONIZING = ResultUtil.error("81100505", "Exist device synchronizing");
        Result EXIST_INTRANET_IP_SYNCHRONIZING = ResultUtil.error("81100511", "Exist intranet ip synchronizing");
        Result GET_FEATURE_FROM_TPC_FAILED = ResultUtil.error("81100506", "Get feature from TPC failed");
        Result RECEIVER_COUNT_MUST_MORE_THAN_ONE = ResultUtil.error("81100507", "The number of receivers must be greater than one ");
        Result EXIST_DEVICE_NOT_ACCESS_TIME_LOCK_FEATURE = ResultUtil.error("81100508", "Exist device not access tpc time lock feature");
        Result TWO_R_BELONG_TO_SAME_MACHINE = ResultUtil.error("81100513", "Two r belong to same machine");
        Result FAILED_TO_GET_MAIN_R = ResultUtil.error("81100509", "Failed to get main R");
        Result MAIN_R_CAN_NOT_BE_REMOVED = ResultUtil.error("81100510", "Main R can not be removed");
        Result NUMBER_OF_PACKS_AND_RECEIVERS_IS_INCONSISTENT = ResultUtil.error("81100511", "The number of packs and receivers is inconsistent");
        Result PARAMETER_IS_INCORRECT = ResultUtil.error("81100512", "parameter is incorrect");
        Result NOT_SYNCHRONIZING = ResultUtil.error("81100601", "Not synchronizing");
        Result PERMISSION_DENIED = ResultUtil.error("81100515", "Permission Denied");
    }
    /**
     * Customized
     */
    interface Customized {
        /**
         * IdleChannel
         */
        interface IdleChannel {
            Result USER_OR_GROUP_NOT_BIND_R = ResultUtil.error("81101401", "User or group not bind R");
            Result GROUP_NOT_BIND_R = ResultUtil.error("81101402", "Group not bind R");
            Result GLOBAL_NO_AUTO_R = ResultUtil.error("81101403", "Global no auto R");
            Result USER_NO_AUTO_R = ResultUtil.error("81101404", "User no auto R");
            Result SOURCE_NOT_EXIST = ResultUtil.error("81101405", "Source not exist");
            Result ALL_R_NOT_EXIST = ResultUtil.error("81101406", "All R not exist in DB");
            Result NOT_EXIST_ONLINE_R = ResultUtil.error("81101407", "Not exist online R");
        }
        /**
         * AutoDevice
         */
        interface AutoDevice {
            Result NO_IDLE_CHANNEL = ResultUtil.error("81101501", "No idle channel");
            Result EXIST_CHANNEL_OCCUPY = ResultUtil.error("81101502", "Exist channel occupied");
        }
        /**
         * Live
         */
        interface Live {
            Result R_NOT_MANUAL = ResultUtil.error("81101601", "Channel not manual");
            Result R_NOT_AUTO = ResultUtil.error("81101602", "Channel not automatic");
        }
        /**
         * Share
         */
        interface Share {
            Result SHARE_ACCOUNT_NOT_EXIST = ResultUtil.error("81101701", "Share account not exist");

            Result CREATE_SHARE_ACCOUNT_FAILED = ResultUtil.error("81101702", "Create share account failed");
            Result CREATE_SHARE_ACCOUNT_EXCEPTION = ResultUtil.error("81101703", "Create share account exception");

            Result CHECK_SHARE_ACCOUNT_FAILED = ResultUtil.error("81101704", "Check share account failed");
            Result CHECK_SHARE_ACCOUNT_EXCEPTION = ResultUtil.error("81101705", "Check share account exception");

            Result SHARE_VIDEO_FAILED = ResultUtil.error("81101706", "Share video failed");
            Result SHARE_VIDEO_EXCEPTION = ResultUtil.error("81101707", "Share video exception");

            Result STOP_SHARE_VIDEO_FAILED = ResultUtil.error("81101708", "Share stop video failed");
            Result STOP_SHARE_VIDEO_EXCEPTION = ResultUtil.error("81101709", "Stop Share video exception");

            Result QUERY_R_SHARE_ACCOUNT_EXCEPTION = ResultUtil.error("81101710", "Query r share account exception");

            Result CREATE_SHARE_T_ACCOUNT_FAILED = ResultUtil.error("81101711", "Create t share account failed");

            Result SHARE_ACCOUNT_IS_SHARING = ResultUtil.error("81101712", "Share account is sharing");
            Result SHARE_ACCOUNT_NOT_SHARING = ResultUtil.error("81101713", "Share account not sharing");
        }

    }
    /**
     * PidPortMapping
     */
    interface PidPortMapping {
        Result ADD_DOMAIN_RECORD_FAILED = ResultUtil.error("81101901", "Add domain record failed");
        Result RELEASE_DOMAIN_RECORD_FAILED = ResultUtil.error("81101902", "Release domain record failed");
        Result RECEIVER_CONFIG_NOT_EXIST_NGINX_LOCAL_PORT = ResultUtil.error("81101903", "Receiver config not exist nginx local port");
        Result DOMAIN_IS_EMPTY = ResultUtil.error("81101904", "Domain is empty.");
    }
}
